import axios from '@/fetch'

export function addAgent(data) {
  return axios({
    url: "/agent/save",
    headers: {'Content-Type': 'application/json'},
    method: "post",
    data: data
  })
}


export function upAgent(id,data) {
  return axios({
    url: "/agent/update",
    headers: {'Content-Type': 'application/json'},
    method: "post",
    params:id,
    data: data
  })
}

export function getAgent(data) {
  return axios({
    url: "/agent/findall",
    method: "post",
    params:data

  })
}

export function getAgentid(data) {
  return axios({
    url: "/agent/findone",
    headers: {'Content-Type': 'application/json'},
    method: "post",
    params:data
  })
}
export function delAgent(id,) {
  return axios({
    url: "/agent/delete",
    headers: {'Content-Type': 'application/json'},
    method: "post",
    params:id,
  })
}

export function atqueryid(data) {
  return axios({
    url: "/agent/findbynumber",
    headers: {'Content-Type': 'application/json'},
    method: "post",
    params: data
  })
}


